package me.hyz.kotlincodelib.anko

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import me.hyz.kotlincodelib.R
import org.jetbrains.anko.*

class AnkoFirstActivity : AppCompatActivity(), AnkoLogger {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_anko_first)
    }

    private fun someMethod() {
        info("London is the capital of Great Britain")
        debug(5) // .toString() method will be executed
        warn(null) // "null" will be printed
    }

    fun TestIntent(){
        startActivity(intentFor<AnkoSecondActivity>("id" to 5).singleTop())
        startActivity<AnkoSecondActivity>()
        startActivity<AnkoSecondActivity>(
            "id" to 5,
            "city" to "Denpasar"
        )
    }
}
